package com.llcbenwu.config;

import com.llcbenwu.exception.BusinessException;
import com.llcbenwu.util.AopUtil;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;


/**
 * @author lilinchun
 * @date 2021/10/22 0022 11:55
 */
@Aspect
@Component
public class CheckUser {




    @Pointcut("@annotation(com.llcbenwu.config.adminFilter)")
    public void  check(){

    }

    //前置通知
    @Before("check()")
    public void  beforeCheck(){
        String aop = AopUtil.getAop();
       throw  new BusinessException(123,"哈哈");
    }

}
